const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('info_person', {
    id: {
      type: DataTypes.STRING(40),
      allowNull: false,
      primaryKey: true
    },
    name: {
      type: DataTypes.STRING(100),
      allowNull: false,
      comment: "姓名"
    },
    level: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "等级"
    },
    trustPercent: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "信任，%"
    },
    insight: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "洞悉（洞悉一级，洞悉二级，洞察之底）"
    },
    portrait: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "塑造"
    },
    resonance: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "共鸣"
    },
    inspiration: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "灵感"
    },
    type: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "类型"
    },
    enName: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "英文名"
    },
    location: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "定位（输出、爆发等）"
    },
    star: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "星级，星"
    },
    medium: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "介质"
    },
    fragrance: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "香调"
    },
    size: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "尺寸"
    },
    createTime: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "创建时间"
    },
    updateTime: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "更新时间"
    }
  }, {
    sequelize,
    tableName: 'info_person',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
